package com.atguigu.auth.mapper;

import com.atguigu.model.system.SysMenu;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * ClassName SysMenuMapper
 * Package: com.atguigu.auth.mapper
 * ProjectName guigu-oa-parent
 * Description:
 *
 * @Author: 比特张
 * @Create: 2023/4/22 - 15:51
 * @Version: v1.0
 */
@Mapper
public interface SysMenuMapper extends BaseMapper<SysMenu> {
    /**
     * 如果不是管理员，根据userId查询可以操作菜单列表
     * 多表关联查询：用户角色关系表、角色菜单关系表、菜单表
     *
     * @param userId
     * @return
     */
    List<SysMenu> findMenuListByUserId(@Param("userId") Long userId);
}
